home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / OLE2BOOK.ZIP / BASICS.ZIP / INTERFAC / IADVSINK.H < prev    next >
C/C++ Source or Header  |  1993-03-26  |  1KB  |  47 lines

  1. /*
  2.  * IADVSINK.H
  3.  *
  4.  * Definitions of a temmplate IAdviseSink interface implementation.
  5.  *
  6.  * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Software Design Engineer
  9.  * Microsoft Systems Developer Relations
  10.  *
  11.  * Internet  :  kraigb@microsoft.com
  12.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  13.  */
  14.  
  15.  
  16. #ifndef _IADVSINK_H_
  17. #define _IADVSINK_H_
  18.  
  19.  
  20. class __far CImpIAdviseSink : public IAdviseSink
  21.     {
  22.     protected:
  23.         ULONG               m_cRef;      //Interface reference count.
  24.         LPVOID              m_pObj;      //Back pointer to the object.
  25.         LPUNKNOWN           m_punkOuter; //Controlling unknown for delegation.
  26.  
  27.     public:
  28.         CImpIAdviseSink(LPVOID, LPUNKNOWN);
  29.         ~CImpIAdviseSink(void);
  30.  
  31.         STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  32.         STDMETHODIMP_(ULONG) AddRef(void);
  33.         STDMETHODIMP_(ULONG) Release(void);
  34.  
  35.         STDMETHODIMP_(void)  OnDataChange(LPFORMATETC, LPSTGMEDIUM);
  36.         STDMETHODIMP_(void)  OnViewChange(DWORD, LONG);
  37.         STDMETHODIMP_(void)  OnRename(LPMONIKER);
  38.         STDMETHODIMP_(void)  OnSave(void);
  39.         STDMETHODIMP_(void)  OnClose(void);
  40.     };
  41.  
  42.  
  43. typedef CImpIAdviseSink FAR * LPIMPIADVISESINK;
  44.  
  45.  
  46. #endif _IADVSINK_H_
  47.